Various types of documents can be created for different purposes to represent different domains. For example, word processing is one domain that has documents created in a natural language such as English and generally contains concepts such as paragraphs, summaries, and headings. Word processing documents can have several types, such as memos, outlines, and letters. Another domain is computer programming that uses elements of a programming language such as identifiers, flow control, and arithmetic operators to represent a computer program. Computer programming documents can also have several types, such as header files, implementation files, and resource files. Each domain has its own set of constraints that defines the proper syntax and lexicon for creating understandable documents in that domain. Even though domains and documents vary greatly, the ways of representing these documents for viewing and editing share many similarities.
Currently, different applications are used for viewing and editing documents for each document domain, and sometimes for each type of document within a domain. For example, many commercial word processors exist for viewing and editing word processing documents. Likewise, many programming editors exist for viewing and editing computer programs, often with separate editors for each programming language. The separation of viewing and editing applications by domain creates a burden on the user of each application to know which application to use for viewing and editing a particular document and to learn the unique features associated with each application. The separation of viewing and editing applications also creates a burden on application developers, who often must reimplement and separately maintain new source code similar to source code that already exists for another domain. The additional burden on application developers introduces additional programming errors, or bugs, and the effort required delays the availability of fully featured applications for viewing and editing documents of new domains.